
   	   
            <?php foreach ($product as $pr) 
                { 
                
                ?>
<h2><span class="de">Name product: </span> <?php echo $pr['pro_name'];?></h2>
                <div id="con_img">
                     <ul> 
                         <li><img class = "img_de" id="img_big" src="<?php echo $pr['pro_img_src']; ?>" ></li>
                        
                        <?php foreach ($imgs as $im) { ?>
                             <li><img class = "img_de" id="img_small" src="<?php echo $im['pro_img_src'];?>"></li>
                        <?php }?>

                    </ul>
                    
                </div>
                
                <div style="clear:both; height: 20px; border-bottom: 1px dotted #CCC;"></div>
                
                <div id = "info_pro" style="padding-top: 10px;">
                    <div id="left_info">
                       
                        <p style="color: green;"><del>Price: $<?php echo $pr['pro_price'];?> </del> </p>
                    <p style="font-size: 15px; color: #FFF; font-weight: bold;">Sale: $<?php echo $pr['pro_sale'];?> </p>
                    <p><span class="de">Information: </span><?php echo $pr['pro_info'];?> </p>
                    <p><span class="de">Brand: </span><?php echo $pr['bra_name'];?> </p>
                    <p><span class="de">Country: </span><?php echo $pr['pro_country'];?> </p>
                    <a href="<?php echo $baseURL;?>default/shopping_cart/buy/<?php echo $pr['pro_id'];?>#cate" class="buy">BUY NOW</a>
                    
                    </div>
                    
                    <div id="review">
                        <h3 style="margin-bottom: 10px; ">Custom review</h3>
                        <div class="jRating" data-average="<?php echo $rating_avg;?>">
                            
                        </div>
                        <script>
                                $(document).ready(function () {
                                    // Cách gọi tùy biến lựa chọn
                                    $('.jRating').jRating({
                                         step : true, // cho phép lựa chọn nửa ngôi sao
                                         length : 5, // hiển thị 10 ngôi sao
                                         type : 'big', // hiển thị ngôi sao nhỏ (mặc định là sao lớn)
                                         rateMax: 5,
                                         phpPath : '<?php echo $baseURL;?>default/product/star/<?php echo $pr['pro_id'];?>',
//                                         onSuccess : function(){ 
//                                             alert('aaa');
//                                         }
                                });
                                });
                            </script>
                        <div style="clear: both; padding: 10px 0px;">
                            <label style="width: 60px; float: left">Name</label>
                            <input type="text" id="name_cm"> <br/><br/>
                            <label style="width: 60px; float: left">Comment</label>
                            <textarea cols="50" rows="3" id="comment"></textarea>
                            <span id="post_cm" style="padding: 3px; background: #CCC; color: #000; cursor: pointer;">post comment</span>
                            <div id="content_cm">
                               
                            </div>
                            <div id="content_cm2">
                                <?php 
                                foreach ($list_comment as $comment) {
                                 echo '<img src="'.$baseURL.'publics/home/images/comment.png" width="30" height="30">
                                <b>'.$comment['cus_name'].'</b>
                                <p style="border-bottom: 1px dotted #FFF; padding-bottom: 5px;">'.$comment['comment'].'</p>';
                             }
                             ?>
                            </div>
                            <script>
                                $(document).ready(function () {
                                    
                                    $('#post_cm').click(function () {
                                        var cus_name = $('#name_cm').val(); 
                                        
                                        var comment = $('#comment').val(); 
                                        $.ajax({
                                        url:"http://mobi.loc/default/product/comment/<?php echo $pr['pro_id'];?>",
                                        type:"POST",
                                        data:"cus_name="+cus_name+"&comment="+comment,
                                        async:true,
                                        success: function(kq){
                                            
                                            $("#content_cm").html(kq);   
                                        }
                                        });
                                    });
                                });
                            </script>
                        </div>
                    </div>

                    </div>
                
            
             <?php   } 